package com.forur.stubootstarter4.controller;

import com.forur.stubootstarter4.entity.Month;
import com.forur.stubootstarter4.service.MonthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MonthController {

    @Autowired
    private MonthService monthService;

    @RequestMapping("/addMonth")
    public void addMonth(Month month) {
        monthService.add(month);
    }

    @RequestMapping("/findmonth")
    public void find(int monthNum) {
        monthService.find(monthNum);
    }
}
